package com.idea.cery.springboot1.base;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;

import javax.jms.Destination;

/**
 * @Author:cery
 * @Version 1.0
 * @Date:2020/4/17
 */
@Component
public class MqProduct {

    @Autowired
    private JmsMessagingTemplate jmsMessagingTemplate;

    public void sendMessaging(Destination des, String message) {
        jmsMessagingTemplate.convertAndSend(des, message);
    }

}
